<?php
/**
 * wap 2.0 用户中心－地址列表
 */


// 取得收货地址
$address_list = get_user_address_list($mInterface, $user_token);

foreach ($address_list AS $key => $val){
	//var_dump(mb_convert_encoding($val['address'], 'utf-8', 'gbk,utf-8,gb2312,ansi'));
}


$count = count($address_list);
$page > ceil($count/$perpage) && $page = ceil($count/$perpage);

$address_list = array_slice($address_list, ($page-1) * $perpage, $perpage);

$params = array('m'=>'user','act'=>$action,'step'=>$step);

// 分页
$pager = get_pager('index.php', $params, $count, $page, $perpage);

wap_setcookie("WAP[back_act]", 'index.php?' . http_build_query($back_param));

/* OMNITURE 统计  */
$pageName = '用户中心-收货地址列表';
include 'omniture/other.php';

$smarty->assign('address_list', $address_list);

$smarty->assign('pager', $pager);

$smarty->display('user_address_list.dwt');